@extends('web.layouts.app')

@section('title', trans('seo.other_title').$article->title)
@section('keywords', trans('seo.default_articles.keywords'))
@section('description', trans('seo.default_articles.description'))

@section('styles')
<link rel="stylesheet" type="text/css" href="{{ asset('resources/web/css/information.css')}}">
@endsection

@section('content')
    <div class="information-wrap mt20 clearfix">
        <div class="information-main">
            <div class="information-info-title">
                <h1>{{ str_limit($article->title,50) }}</h1>
                <div class="tips">
                    <div class="L">
                        <a class="author" href="#" target="_blank">{{ $article->author }}</a>
                        @foreach(explode(',', $article->tags) as $tag)
                            @if(!empty($tag))
                            <label class="tag"><a href="{{ action('ArticleController@article_query',['article_type_id'=>$article->article_category_id,'tag'=>$tag]) }}">{{ $tag }}</a></label>
                        @endif
                                @endforeach
                    </div>
                    <span class="R">{{ $article->created_at }}</span>
                </div>
            </div>
            <div class="information-info" id="article-content">
                {{--<img src="../public/uploads/wenzhang-img.jpg" height="220" width="700">--}}
                {!! $article->content !!}
            </div>
            <div class="information-tool">
                <a class="backlist" href="{{ action('ArticleController@list') }}">文章列表<i>&lt;</i></a>
                <div class="share clearfix bdsharebuttonbox" id="share">
                 <!--    <span>分享到：</span>
                    <a href="#" class="st-weibo" data-cmd="tsina" title="分享到新浪微博"></a>
                    <a href="#" class="st-qzone" data-cmd="qzone" title="分享到QQ空间"></a>
                    <a href="#" class="st-weixin" data-cmd="weixin" title="分享到微信"></a>
                    <a href="#" class="st-renren" data-cmd="renren" title="分享到人人网"></a>
                    <a href="#" class="st-tqq" data-cmd="tqq" title="分享到腾讯微博"></a> -->
                </div>
                <script>window._bd_share_config={"common":{"bdSnsKey":{},"bdText":"分享到：","bdMini":"1","bdMiniList":false,"bdPic":"","bdStyle":"2","bdSize":"24"},"share":{}};with(document)0[(getElementsByTagName('head')[0]||body).appendChild(createElement('script')).src='https://bdimg.share.baidu.com/static/api/js/share.js?v=89860593.js?cdnversion='+~(-new Date()/36e5)];</script>
            </div>
            <div class="information-info-page clearfix">
                <p><span>上一篇：</span><a href="{{empty($article->prev())?"#":action('ArticleController@article_information_info',[$article->prev()->id]) }}">{{ str_limit($article->prev()->title??"无",25) }}</a></p>
                <p><span>下一篇：</span><a href="{{empty($article->next())?"#":action('ArticleController@article_information_info',[$article->next()->id]) }}">{{ str_limit($article->next()->title??"无",25)}}</a></p>
            </div>
        </div>
        <div class="information-side">
            <dl class="information-side-banner">
                <dt>{{ $ad1[0]->name }}</dt>
                <dd><a href="{{ $ad1[0]->link }}"><img src="{{ asset($ad1[0]->image,230,135) }}" height="135" width="230"></a></dd>
            </dl>
            <div class="information-side-list mt20">
                <div class="information-block-title">推荐文章</div>
                <ul>
                    @foreach($recommends as $recommend)
                        <li><a href="{{ action("ArticleController@article_information_info",[$recommend->id]) }}">{{ $recommend->title }}</a></li>
                    @endforeach
                </ul>
            </div>
            <dl class="information-side-banner pt20">
                <dt>{{ $ad2[0]->name }}</dt>
                <dd><a href="{{ $ad2[0]->link }}"><img src="{{ asset($ad2[0]->image,230,90) }}" height="90" width="230"></a></dd>
            </dl>
        </div>
    </div>
@endsection

@section('scripts')
<script src="{{ asset('resources/admin/plugins/ueditor/ueditor.parse.min.js')}}"></script>
<script>
    $(function(){
        uParse('#article-content');
    })
</script>
@endsection